let url = require("url");
let qs = require("querystring");
// let path = require("path");
let str = "https://www.baidu.com/s?wd=npm%E5%AE%98%E7%BD%91&rsv_spt=1&rsv_iqid=0xb058ed8f00011a59&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_dl=tb&rsv_enter=1&oq=npm&rsv_t=4ca0kV5Q%2FixvEde1dkFC%2B0BhDvj%2FSxaa%2FK4qI%2BxKVvzCKHffvSIAE5pndYdVvGca2pgn&rsv_btype=t&inputT=1346&rsv_pq=f9dc0cec000051ab&rsv_sug3=42&rsv_sug2=0&rsv_sug4=2509"; 
let obj = url.parse(str);
// console.log(obj);
let str1 = obj.query;
// console.log(str1)
let obj1 = qs.parse(str1);
// console.log(obj1)
let lj = obj.path;
console.log(lj)